//Author: A0083934X

package Main;


public class Expense {
	private double budget = 0;
	private double spending = 0;
	private String alert;
	
	public double getBudget(){
		return budget;
	}
	public double getSpending(){
		return spending;
	}
	public String getAlert(){
		double remaining = budget - spending;
		if(remaining/budget < 0.15 && remaining/budget >= 0){
			alert = "Warning! You have less than 15% of the budget left!";
		}
		else if(remaining/budget < 0){
			alert = "Warning!! You have exceeded your budget!!!";
		}
		else{
			alert = "There is no budget problem!";
		}
		
		return alert;
	}
	
	public void setBudget(double b){
		budget = b;
	}
	public void setSpending(double s){
		spending = s;
	}
	
	
}
